package work.xiaohong.saolei.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import static io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_ONLY;

@Schema(name = "Dianzhan")
@Data
public class Dianzhan implements Serializable{

    @TableId(value = "id",type = IdType.ASSIGN_ID)
    @Schema(description = "主键id",accessMode = READ_ONLY,required = true)
	private Long id;//主键id

    @Schema(description = "点赞者",required = true)
    @TableField("provider")
	private Long provider;//点赞者

    @Schema(description = "被点赞者",required = true)
    @TableField("receiver")
	private Long receiver;//被点赞者

    @Schema(description = "创建时间",accessMode = READ_ONLY)
    @TableField(value = "gmt_create",fill = FieldFill.INSERT)
	private LocalDateTime gmtCreate;//创建时间

    @Schema(description = "更改时间",accessMode = READ_ONLY)
    @TableField(value = "gmt_modified",fill = FieldFill.INSERT_UPDATE)
	private LocalDateTime gmtModified;//更改时间

    @Schema(description = "乐观锁",accessMode = READ_ONLY)
    @Version
	private Integer version;//乐观锁

    @Schema(description = "逻辑删除标志",accessMode = READ_ONLY)
    @TableLogic
	private Integer deleted;//逻辑删除标志


}
